<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/echarts.min.js"></script>
    <style>
        .box {
            width: 500px;
            height: 500px;
            border: 1px solid #000;
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>
<script>
    let dom = document.querySelector(".box")
    let mychart = echarts.init(dom)
    let option = {
  xAxis: {
    data: ['2022-10-6', '2022-10-7', '2022-10-8', '2022-10-9']
  },
  yAxis: {},
  series: [
    {
      type: 'candlestick',
      data: [
        [20, 34, 10, 38],
        [40, 35, 30, 50],
        [31, 38, 33, 44],
        [38, 15, 5, 42]
      ],
      markPoint: {
        data: [
          { type: 'max', name: 'Max' },
          { type: 'min', name: 'Min' }
        ],
        itemStyle:{
            color:'#000'
        }

      },
      hoverAnimation:true
    },
    {
        type:"line",
        data:[20,40,31,38],
        smooth: true
    }
  ]
};
    mychart.setOption(option)

</script>